{% extends 'TopxiaAdminBundle::layout.html.twig' %}

{% set menu = 'admin_teacher_manage' %}

{% set script_controller = 'teacher/teacher-list' %}

{% block main %}
<form id="user-search-form" class="form-inline well well-sm" action="" method="get" novalidate>
  {% include 'OrgBundle:Org:org-tree-select.html.twig' with {orgCode: app.request.get('orgCode'), modal: 'list'} %}
  
  <div class="form-group">
    <input type="text" name="nickname" class="form-control" value="{{ app.request.query.get('nickname') }}" placeholder="用户名">
  </div>

  <button class="btn btn-primary">搜索</button>

</form>
<table id="teacher-table" class="table table-striped table-hover" data-search-form="#user-search-form">
  <thead>
    <tr>
      <th>用户名</th>
      {% include 'OrgBundle:Org/Parts:table-thead-tr.html.twig' %}
      <th width="30%" >推荐教师</th>
      <th>最近登录</th>
      <th>操作</th>
    </tr>
  </thead>
  <tbody>
    {% if users %}
      {% for user in users %}
        {% include 'TopxiaAdminBundle:Teacher:tr.html.twig' with {user:user} %}
      {% endfor %}
    {% else %}
       <tr><td colspan="20"><div class="empty">暂无教师记录</div></td></tr>
    {% endif %}
  </tbody>
</table>
 {{ web_macro.paginator(paginator) }} 
{% endblock %}